Technote 1121Mac OS 8.1Version 1.0 |
Mac OS 8.1 introduces a number of new and/or updated technologies. This Technote documents the changes that most likely will affect developers. |
NOTE |
Finder 8.1Finder 8.1 changes fall into three categories: Finder 8.1 also defines two new bits in its Gestalt selector. New features:
Enhancements to existing features:
Bug fixes:Dozens of bugs have been fixed, including many in AppleScript support. Some internal subsystems have been redesigned and re-implemented for substantially better stability. Finder/AppleScript bug fixes:
Other specific bug fixes:
Gestalt:As a result of the above changes and changes in Finder 8, Finder's Gestalt selector response value has acquired two new defined bits under Mac OS 8.1: enum { gestaltFinderFloppyRootComments = 8, gestaltFinderLargeAndNotSavedFlavorsOK = 9 };
Before testing for either of these bits, you should first test for the presence of Mac OS 8 or later. If Mac OS 8 is present, neither of these bits will be set. HFS Plus Volume FormatMac OS 8.1 introduces support for Apple's new volume format, HFS Plus (also known as Mac OS Extended). This format is available for use with any storage device larger than 32MB that support the HFS volume format. Benefits Provided in Mac OS 8.1The main benefit in this release of the Mac OS Extended volume format is the use of smaller allocation blocks. The size of allocation blocks used for a particular volume depend on its size. |
Volume Size
Default allocation block size
<= 256 MB
512
<= 512 MB
1K
<= 1GB
2K
> 1GB
4K
The default allocation block size of 4K was chosen for volumes larger than 1GB. For a number of reasons:
Future BenefitsThe Mac OS Extended volume format also provides support for long Unicode file names, large files, and extended attributes. However, Mac OS 8.1 does not introduce the new APIs required to access these advanced features. The support for Mac OS Extended volumes was added in such a way that use of these volumes should be transparent to developers who use only the documented File Manager API. |
Note: |
Mac OS 8.1 introduces a few changes to the existing File Manager API that developers should be aware of. These changes include routines for getting extended volume information and for controlling the formatting process. These changes are described in a separate HFS Plus Technote which will be published in the near future along with another document, "Mac OS Extended Volume Format", that describes the format of an HFS Plus volume. |
Note: |
Note: |
To prevent problems for our users, and to ensure that extensions
load in the same order regardless of the volume format used, an
extension table mechanism was added to the Start Manager. The default
behavior of the extension table handler is to sort the extensions
into The Extension Table Manager also provides a mechanism that third-party products can use to watch, and optionally control, the extension loading process. A Technote covering this new mechanism is in progress and will be released in the near future. Sound for PCI SystemsThere have been a number of additions and changes to the sound software for PCI-based Macintoshes under Mac OS 8.1 that will affect developers. AdditionsA programmatic method for selecting sound sources via the Sound
Input Manager using
Four new selectors have been added to the built-in sound input driver: enum { siMonitorAvailable = 'mnav', siMonitorSource = 'mons', siOSTypeInputSource = 'inpt', siOSTypeInputAvailable = 'inav' }; These selectors allow the use of several new constants to set a particular input source or monitor source programmatically. For instance, to have the user record the CD, an application could use code like this: inline OSErr SetInputSource (long soundRefNum, OSType inputSource) { return SPBSetDeviceInfo (soundRefNum, siOSTypeInputSource, &inputSource); } where The The currently defined input source selectors are: enum { kNoSource = 'none', /*no source selection*/ kCDSource = 'cd ', /*internal CD player input*/ kExtMicSource = 'emic', /*external mic input*/ kRCAInSource = 'irca', /*RCA jack input*/ kTVFMTunerSource = 'tvfm', kDAVInSource = 'idav', /*DAV analog input*/ kIntMicSource = 'imic', /*internal mic input*/ kMediaBaySource = 'mbay', /*media bay input*/ kModemSource = 'modm', /*modem input*/ kZoomVideoSource = 'zvpc' /*zoom video input*/ }; Changes
End User ExperienceThere have also been some minor changes, which make the sound experience more enjoyable and predictable for the user. They are:
|
Note: |
A resident page has two states: clean and dirty. A clean page's data does not need to written from memory to the backing store file before the page is made non-resident. A dirty page's data must be written from memory to the backing store file before the page is made non-resident. A non-resident page also has two states: valid on disk and invalid on disk. A non-resident page which is valid on disk must be read from the backing store file into memory when it is made resident. A non-resident page which is invalid on disk does not need to be read from the backing store file into memory when it is made resident. |
Note: |
|
Use the |
pascal OSErr MakeMemoryResident (void *address, unsigned long count); address The starting address of the range of memory to be made resident. count The size, in bytes, of the range of memory to be made resident.
|
|
Note: |
The File Manager calls this selector and uses the values returned to help determine the value it will use for the allocation block size when formatting a volume as Mac OS Extended.
struct DriverGestaltMediaInfoResponse { UInt32 numberBlocks; /* number of blocks */ UInt32 blockSize; /* physical size of blocks */ SInt16 mediaType; /* media type identifier */ }; typedef struct DriverGestaltMediaInfoResponse DriverGestaltMediaInfoResponse; /* DriverGestaltMediaInfoResponse.mediaType constants */ enum { kMediaTypeUnknown = 128, /* media type is unknown */ kMediaTypeCDROM = 129, /* media type is a CD-ROM */ kMediaTypeDVDROM = 130, /* media type is a DVD-ROM */ kMediaTypeNoMedia = -1 /* no media is present */ };
MRJ 2.0 supports Sun's Java version 1.1.3 specification, which has added or improved support in the following areas:
For further information, see the Mac OS Runtime for Java site.
Open Transport 1.3Mac OS 8.1 installs Open Transport v1.3, which contains a number of new features and bug fixes. An updated OT 1.3 SDK and OT 1.3 Release Notes are available. Bug fixes:General
Open Transport Debugger Preferences (for debug version only)
AppleTalk
TCP/IP
Links
API Changes
CFM-68K Support
Single Link Multi-homingOpen Transport 1.3 introduces single link multi-homing, a mechanism by which Open Transport can support multiple IP addresses on the same hardware interface. Synonyms for this feature include IP Aliasing, Secondary IP address support, IP Masquerading, "Multihoming", and IP Multinode support. This is useful for sites like Internet Service Providers (ISPs), that want to give each of their clients a distinct IP address, without requiring separate computers for each address. Web server software packages or server plug-ins that utilize this feature can offer virtual domain support that supports all web browsers. This functionality is transparent to Open Transport clients who are not specifically interested in single link multi-homing. The following information will help TCP/IP server developers implement single link multi-homing support into their products. Important: As described below, in a multi-homed
environment, if you bind to a specific IP address, you will only
received connections targeted at that IP address. While this is
useful if you want to support different operations on different IP
addresses, most programs do not want this. If your program does not
take advantage of single link multi-homing, it's important that it
bind listening endpoints to the address Single Link Multi-homing System SetupSingle link multi-homing support is only available with Open Transport 1.3 or higher. Your product will need to check that this version of Open Transport is present. See the section Checking the Open Transport Version for details on how to check for the presence of Open Transport 1.3 or higher. You configure a system to use multiple IP addresses as follows:
Each line of the IP Secondary Addresses file contains a secondary IP address to be used by the system, and an optional subnet mask and router address for the secondary IP address. If there is no subnet mask entry, then a default subnet mask for the IP address class will be used. If there is no router address entry, then the default router associated with the primary address will be used. Each secondary address entry must be prefixed by "ip=". Each subnet mask entry must be prefixed by "sm=". Each router address entry must be prefixed by "rt=". An example of the contents of the IP Secondary Addresses file follows. ; 'ip=' for ip address, 'sm=' subnet mask, 'rt=' router address ; Note: nspace in 'ip=192.168.22.200' ; ; IP address Subnet Mask router addresses ;----------- ----------- ---------------- ip=192.168.22.200 sm=255.255.255.0 rt=192.168.20.1 ip=192.168.22.201 rt=192.168.20.1 ip=192.168.22.202 The order of the entries is important. The "rt=" entry must follow the "sm=" entry if used. When Open Transport 1.3 activates TCP/IP, the primary address will be obtained from the TCP/IP Control Panel setting. Open Transport then looks for the IP Secondary Addresses file in the Preferences folder, to determine if additional addresses should also be configured. If there are duplicate IP address entries in the IP Secondary Addresses file, the duplicated addresses will be ignored. When Open Transport binds a TCP/IP connection, if there is an address conflict of the primary or any secondary addresses with another host, Open Transport will present an error message using a dialog box and will unload Open Transport TCP/IP from memory. The error dialog will display the conflicting IP address, the hardware address of the conflicting machine and note that your TCP/IP network interface has been shut down. Checking the Open Transport VersionTo check that Open Transport version 1.3 is present, use the
Gestalt function with the enum { kOTIPSingleLinkMultihomingVersion = 0x01300000 // OT 1.3 }; InetInterfaceInfo Structure ChangeThe struct InetInterfaceInfo { InetHost fAddress; InetHost fNetmask; InetHost fBroadcastAddr; InetHost fDefaultGatewayAddr; InetHost fDNSAddr; UInt16 fVersion; UInt16 fHWAddrLen; UInt8* fHWAddr; UInt32 fIfMTU; UInt8* fReservedPtrs[2]; InetDomainName fDomainName; UInt32 fIPSecondaryCount; // returns number of IP secondary addresses UInt8 fReserved[252]; }; You can pass this new structure to the
To distinguish this structure from earlier variants, the
|
Parameters |
Before Call |
After Call |
---|---|---|
addr |
|
|
count |
|
|
index |
|
|
OTInetGetSecondaryAddress
is used to copy the
supported secondary addresses associated with an IP interface.
OTInetGetSecondaryAddress
uses the index parameter to
specify which IP interface to obtain secondary addresses for. For the
primary IP interface, set index to kDefaultInetInterface
which is -1. OTInetGetSecondaryAddress
uses the count
parameter to know how many secondary addresses to return in the
buffer pointed to by addr
. The addr
buffer
must be of size count
* sizeof(InetAddr)
to
hold all of the desired addresses. Use the
fIPSecondaryCount
field of the
InetInterfaceInfstructure
returned by calling
OTInetGetInterfaceInfo
to determine the required size of
the buffer. OTInetGetSecondaryAddress
also modifies
count to indicate the number of secondary addresses actually returned
if less than the specified number of secondary addresses are
returned.
Text Encoding Converter Manager 1.3The Text Encoding Conversion Manager provides two facilities--the Text Encoding Converter and the Unicode Converter--that your application can use to handle text encoding conversion on the Mac OS. For further information, see Inside Macintosh: Programming With the Text Encoding Conversion Manager. Version 1.3 of the Text Encoding Converter Manager (TEC) is included with Mac OS 8.1. The HFS Plus volume format introduced with Mac OS 8.1 stores filenames using the canonical decomposition form of Unicode 2.0; several of the TEC 1.3 changes are to support HFS Plus.
Interface File Changes
Implementation Bug Fixes
Implementation Enhancements
Mapping ChangesAmong other things, the changes listed below ensure 100% round trip fidelity for strict mapping in either direction (non-Unicode to Unicode and back or vice versa) for both Mac OS encodings and other non-Unicode encodings.
User Interface Changes
Downloadables![]() To contact us, please use the Contact Us page.
|